﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace BMManage
{
    public partial class loginFrm : Form
    {
        public loginFrm()
        {
            InitializeComponent();
        }
        public BMWebService.DataSetDB.USERSRow SystemUser = null;
        private void button1_Click(object sender, EventArgs e)
        {
            BMWebService.BMWebService service = new BMWebService.BMWebService();
            var data = service.GetUserLogin(textBox1.Text.Trim(), textBox2.Text.Trim());
            if (data.Count > 0)
            {
                this.DialogResult = DialogResult.OK;
                SystemUser = data[0];
            }
            else
            {

                MessageBox.Show("用户不存在或密码错误.");
            }

        }
    }
}
